package com.shycloud.mido.organ.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.member.api.entity.TeacherApproval;
import com.shycloud.mido.organ.api.dto.TeacherApprovalDTO;
import com.shycloud.mido.organ.api.entity.TeacherSubjectEntity;
import com.shycloud.mido.organ.api.vo.TeacherApprovalVO;
import com.shycloud.mido.organ.api.entity.TeacherApprovalEntity;
import com.shycloud.mido.organ.api.vo.TeacherSubjectVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * 教师审核Mapper
 *
 * @author yyy
 * @since 2019-09-25
 */
public interface TeacherApprovalMapper extends BaseMapper<TeacherApprovalEntity> {

	/**
	 * 分页查询教师资格认证
	 *
	 * @param page 分页
	 * @param teacherApprovalDTO 查询参数
	 * @return list
	 */
	IPage<List<TeacherApprovalVO>> getTeacherApprovalVosPage(Page page, @Param("query") TeacherApprovalDTO teacherApprovalDTO);

	/**
	 * 查询证书照片
	 * @param memberId
	 * @return
	 */
	List<String> getTeacherApprovalProPic(@Param("memberId") String memberId);

	/**
	 * 查询科目
	 * @param memberId
	 * @return
	 */
	List<TeacherSubjectVO> getTeacherApprovalSubjectId(@Param("memberId") String memberId);


	/**
	 * 更新教师认证
	 * @param memberId 会员ID
	 * @param status   状态
	 * @return
	 */
	boolean updIsTeacher(@Param("memberId")String memberId,@Param("status")String status);

	/**
	 * 更新教师信息
	 * @param teacher
	 * @return
	 */
	boolean insertTeacherInfo(@Param("teacher") TeacherApprovalEntity teacher);

}
